package com.marui.ch8a.marui.vo;


public class MTaskResult<R> {
    private final MTaskResultType mTaskResultType;
    private final R returnValue;
    private final String reason;

    public MTaskResult(MTaskResultType mTaskResultType, R returnValue, String reason) {
        super();
        this.mTaskResultType = mTaskResultType;
        this.returnValue = returnValue;
        this.reason = reason;
    }

    public MTaskResult(MTaskResultType mTaskResultType, R returnValue) {
        super();
        this.mTaskResultType = mTaskResultType;
        this.returnValue = returnValue;
        this.reason = "success";
    }

    public MTaskResultType getmTaskResultType() {
        return mTaskResultType;
    }

    public R getReturnValue() {
        return returnValue;
    }

    public String getReason() {
        return reason;
    }

    @Override
    public String toString() {
        return "MTaskResult{" +
                "mTaskResultType=" + mTaskResultType +
                ", returnValue=" + returnValue +
                ", reason='" + reason + '\'' +
                '}';
    }
}
